<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>主页</title>
	<script type="text/javascript"
			src="${pageContext.request.contextPath}/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript">
		function checkForm() {
			var userName = document.getElementById("userName").value;
			var password = document.getElementById("password").value;
			if (userName == null || userName == "") {
				document.getElementById("login_err").innerHTML = "用户名不能为空";
				return false;
			}
			if (password == null || password == "") {
				document.getElementById("login_err").innerHTML = "密码不能为空";
				return false;
			}
			return true;
		}
	</script>
</head>
<body>
<div>
	欢迎您！${currentUser.userName }
</div>
<br>
<div>
	<form id="submitForm" action="${pageContext.request.contextPath}/user/save.do"
		  method="post" onsubmit="return checkForm()">
		<div id="login_tip">
			<span id="login_err" class="sty_txt2">${errorMsg }</span>
		</div>
		<div>
			用户名： <input type="text" id="userName" name="userName" class="username"
						value="${user.userName }">
		</div>
		<div>
			密&nbsp;码：<input type="password" id="password"
											  name="password" class="pwd"
											  value="${user.password }">
		</div>
		<div>
			真实姓名：<input type="text" id="trueName"
											  name="trueName" class="pwd"
											  value="${user.trueName }">
		</div>
		<div id="btn_area">
			<input type="submit" class="login_btn" id="login_sub" value="新增">
			<input type="reset" class="login_btn" id="login_ret" value="重 置">
		</div>
	</form>
</div>
</body>
</html>